package com.IOSLab.dto;


import com.IOSLab.entity.UserInfo;
import com.IOSLab.enums.UserInfoEnum;

/**
 * @Author:WenTao
 * @Description:用户信息状态返回类
 * @Date:12:50 2018/9/20
 */
public class UserInfoExecution {
    /*结果状态*/
    private int state;
    /*状态标识*/
    private String stateInfo;
    /*用户对象*/
    private UserInfo userInfo;


    /*操作失败时的构造器*/
    public UserInfoExecution(UserInfoEnum userInfoEnum) {
        this.state = userInfoEnum.getState();
        this.stateInfo = userInfoEnum.getStateInfo();
    }

    /*操作成功时的构造器*/
    public UserInfoExecution(UserInfoEnum userInfoEnum, UserInfo userInfo) {
        this.state = userInfoEnum.getState();
        this.stateInfo = userInfoEnum.getStateInfo();
        this.userInfo = userInfo;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

}
